Skip to content

Upgrade to Kit v7 - #169

Draft
macalinao wants to merge 1 commit into
solana-foundation:mainfrom
macalinao:upgrade-kit-v7
Draft

Upgrade to Kit v7#169
macalinao wants to merge 1 commit into
solana-foundation:mainfrom
macalinao:upgrade-kit-v7

Conversation

@macalinao

@macalinao macalinao commented Jul 20, 2026

Copy link
Copy Markdown

Summary

Upgrades @solana/kit and the related @solana/* catalog packages from v6 to v7.

  • Bump the solana catalog entries (@solana/kit, @solana/compat, @solana/addresses, @solana/codecs-core, @solana/codecs-strings, @solana/errors, @solana/keys, @solana/promises, @solana/signers, @solana/transactions, @solana/transaction-confirmation, @solana/transaction-messages) to ^7.0.0, plus the @solana/kit deps in the examples and the root @solana/codecs-strings devDependency.
  • Planner default (behavioral change): Kit v7 lowers the default maxInstructionsPerTransaction from 64 to 16. The transaction helpers adopt this new default, so preparing a transaction whose instructions no longer fit in a single message (previously up to 64) will now produce a multi-transaction plan and throw. Callers relying on the old limit should split their instructions.
  • TransactionVersion widening: Kit v7 adds transaction version 1 to TransactionVersion, but createTransactionMessage only accepts Exclude<TransactionVersion, 1>. The transaction helpers now type their version inputs with a new SupportedTransactionVersion alias (exported from features/transactions.ts) to reflect the versions they actually support. This resolves the type errors introduced by the widened union.

Changeset: @solana/client minor bump.

Testing

  • pnpm lint
  • pnpm test
  • pnpm build
  • pnpm typecheck

@vercel

vercel Bot commented Jul 20, 2026

Copy link
Copy Markdown

@macalinao is attempting to deploy a commit to the Solana Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps

greptile-apps Bot commented Jul 20, 2026

Copy link
Copy Markdown

Greptile Summary

This PR upgrades all @solana/* catalog packages from v6 to v7, coordinating version bumps across the workspace catalog, example apps, and root package.json, while adding a new SupportedTransactionVersion alias to accommodate Kit v7's widened TransactionVersion union.

  • Catalog & lockfile bumps: All thirteen @solana/* catalog entries move from ^6.0.1 to ^7.0.0; pnpm lockfile is regenerated consistently; example package.json files follow suit.
  • SupportedTransactionVersion type (Exclude<TransactionVersion, 1>): Exported from features/transactions.ts and imported into all four feature files (sol, spl, stake, wsol) to keep createTransactionMessage calls type-safe, since v7 adds version 1 but the helper layer does not yet handle it.
  • Changeset: Filed as minor with clear documentation of the maxInstructionsPerTransaction default change (64 → 16) and the new type export.

Confidence Score: 5/5

Safe to merge — version bumps are consistent across the workspace, the new SupportedTransactionVersion type correctly constrains the public API, and all CI checks pass.

The change is a mechanical dependency upgrade with a targeted type-level fix. Every @solana/* catalog entry is updated uniformly, the lockfile reflects the resolved v7 packages, and the SupportedTransactionVersion alias cleanly prevents callers from passing an unsupported version 1 to createTransactionMessage.

No files require special attention.

Important Files Changed

Filename Overview
packages/client/src/features/transactions.ts Introduces SupportedTransactionVersion = Exclude<TransactionVersion, 1>, replaces all TransactionVersion usages in public types and internal helpers with this alias — type-safe and well-documented.
packages/client/src/features/sol.ts Drops TransactionVersion import from @solana/kit; imports SupportedTransactionVersion from ./transactions and applies it to transactionVersion in SolTransferPrepareConfig.
packages/client/src/features/spl.ts Same mechanical swap as sol.ts; transactionVersion in SplTransferPrepareConfig now typed as SupportedTransactionVersion.
packages/client/src/features/stake.ts SupportedTransactionVersion applied to StakePrepareConfig, UnstakePrepareConfig, and WithdrawPrepareConfig; no logic changes.
packages/client/src/features/wsol.ts SupportedTransactionVersion applied to WsolWrapPrepareConfig and WsolUnwrapPrepareConfig; runtime usage of config.transactionVersion ?? 0 is unchanged from pre-PR.
pnpm-workspace.yaml All thirteen @solana/* catalog entries updated from ^6.0.1 to ^7.0.0; non-kit packages (@solana/connector, @solana/web3.js) correctly left unchanged.
.changeset/kit-v7-upgrade.md Correctly filed as minor; documents both the maxInstructionsPerTransaction default change and the new SupportedTransactionVersion export.
pnpm-lock.yaml Lockfile regenerated consistently; all @solana/* peer-dependency resolution chains updated to v7; @solana/connector@0.2.3 resolves correctly against Kit v7.

Reviews (2): Last reviewed commit: "Upgrade to Kit v7" | Re-trigger Greptile

Comment on lines +1 to +3
---
"@solana/client": patch
---

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 The changeset bump level is patch, but this PR bumps a major dependency version (@solana/kit v6 → v7) and introduces a new exported type (SupportedTransactionVersion). Per semver convention, adding new public API surface or a significant dependency upgrade is typically a minor bump so that downstream consumers can see from the version number that something meaningfully changed.

Suggested change
---
"@solana/client": patch
---
---
"@solana/client": minor
---

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant